package com.fingard.dsp.bank.helpers;

import java.io.File;
import java.util.Date;

import com.fingard.constant.Format;
import com.fingard.dsp.bank.directbank.DirectBase;

public class DataFileHelper {

	private DirectBase dBase = null;
	public DataFileHelper(DirectBase p_dBase){
		dBase = p_dBase;
	}
	
	/**获取保存银行返回的电子回单数据的本地文件路径*/
	public String getBankReceiptDataFile(Date p_date, String p_act){
		String dataDir = dBase.getDataFileDirectory(p_date);
		String saveFile = dataDir+File.separator+"receiptData_"+p_act+"_"+Format.Date8Format.format(p_date)+".txt";
		return saveFile;
	}
	
	/**获取保存的文件列表文件路径*/
	public String getBankReceiptSavedRecordFile(Date p_date, String p_act, String p_fixStr){
		String dataDir = dBase.getDataFileDirectory(p_date);
		String saveFile = dataDir+File.separator+"receiptData_"+p_act+"_"+Format.Date8Format.format(p_date)+"."+p_fixStr+".txt";
		return saveFile;
	}
}
